<template>
  <router-view></router-view>
  <!-- tabbar底部导航栏 -->
  <van-tabbar v-model="active" route v-show="$route.meta.showTabbar" fixed placeholder>
    <van-tabbar-item icon="home-o" to="/" replace>首页</van-tabbar-item>
    <van-tabbar-item icon="list-switch" to="/sort" replace>分类</van-tabbar-item>
    <van-tabbar-item icon="cart-o" to="/cart" replace>购物车</van-tabbar-item>
    <van-tabbar-item icon="contact-o" to="/my" replace>我的</van-tabbar-item>
  </van-tabbar>

  <van-overlay :show="show" @click="show = false">
    <div class="wrapper" @click.stop>
      <div class="block">请先登录！</div>
    </div>
  </van-overlay>
</template>
<script>
export default {
  data() {
    return {
      active: 0,
      show: false
    };
  }
};
</script>
<style lang="css" scoped>
.block {
  width: 120px;
  height: 120px;
  background-color: #fff;
}
</style>
